package gr.nouki.socialparkingfinder;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
import android.widget.Spinner;

public class SignUpActivity extends Activity {

	private Spinner brands;
	private Spinner years;
	private Spinner models;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// Remove title bar
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);

		// Remove notification bar
		this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);

		initSpinners();

		setContentView(R.layout.activity_sign_up);
	}

	private void initSpinners() {
		brands = (Spinner) findViewById(R.id.brandSpinner);
		years = (Spinner) findViewById(R.id.yearSpinner);
		models = (Spinner) findViewById(R.id.modelSpinner);

		List<String> list = new ArrayList<String>();
		list.add("Please select your car's brand name");
		list.add("Audi");
		list.add("Bmw");
		list.add("Honda");
		list.add("Toyota");

		ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,
				android.R.layout.simple_spinner_item, list);
		dataAdapter
				.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		brands.setAdapter(dataAdapter);

		list = new ArrayList<String>();
		list.add("Please select your car's year of production");
		list.add("2014");
		list.add("2013");
		list.add("2012");
		list.add("2011");

		dataAdapter = new ArrayAdapter<String>(this,
				android.R.layout.simple_spinner_item, list);
		dataAdapter
				.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		years.setAdapter(dataAdapter);

		list = new ArrayList<String>();
		list.add("Please select your car's model name");
		list.add("TT");
		list.add("M3");
		list.add("S6");
		list.add("S4");

		dataAdapter = new ArrayAdapter<String>(this,
				android.R.layout.simple_spinner_item, list);
		dataAdapter
				.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		models.setAdapter(dataAdapter);
	}
}
